// 云函数入口文件
const cloud = require('wx-server-sdk')

cloud.init()

const db=cloud.database()
const _ = db.command

// 云函数入口函数
exports.main = async (event, context) => {
    return await db.collection('gift').add({
       data:{
        name:event.name1,
        phonenum:event.phonenum1,
        sex:event.sex,
        name2:event.name2,
        phonenum2:event.phonenum2,
        address:event.address,
        wgift:event.wgift,
        time:event.time,
        complete:false,
        admin_send:event.admin_send,
        user_send:event.user_send,
        time2:'',
        time3:''
       }
   })
}